/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.compomics.dataprovider.view.wizard.panels.processing;

/**
 *
 * @author Kenneth
 */
public class ProcessingMethodPanel extends javax.swing.JPanel {

    /**
     * Creates new form InputMethodPanel
     */
    public ProcessingMethodPanel() {
        initComponents();
    }

    public void reset(){
        rbdDecoys.setSelected(false);
        rbdCrap.setSelected(false);
        rdbDuplicateAccessions.setSelected(false);
        rdbDuplicateSequences.setSelected(false);
        rdbAppend.setSelected(false);
    }
    
    public boolean isDecoys() {
        return rbdDecoys.isSelected();
    }

    public boolean isCrap() {
        return rbdCrap.isSelected();
    }

    public boolean isDeleteDuplicateAccessions() {
        return rdbDuplicateAccessions.isSelected();
    }

    public boolean isDeleteDuplicateSequences() {
        return rdbDuplicateSequences.isSelected();
    }

    public boolean isAppend() {
        return rdbAppend.isSelected();
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        rdbDuplicateAccessions = new javax.swing.JRadioButton();
        rdbDuplicateSequences = new javax.swing.JRadioButton();
        rbdDecoys = new javax.swing.JRadioButton();
        jLabel2 = new javax.swing.JLabel();
        rbdCrap = new javax.swing.JRadioButton();
        rdbAppend = new javax.swing.JRadioButton();

        setBackground(new java.awt.Color(255, 255, 255));

        rdbDuplicateAccessions.setBackground(new java.awt.Color(255, 255, 255));
        rdbDuplicateAccessions.setText("Merge Duplicate Accessions");
        rdbDuplicateAccessions.setToolTipText("Merge entries with the same accession into a single entry.");

        rdbDuplicateSequences.setBackground(new java.awt.Color(255, 255, 255));
        rdbDuplicateSequences.setText("Remove Duplicate Sequences");
        rdbDuplicateSequences.setToolTipText("Remove entries with identical sequences");

        rbdDecoys.setBackground(new java.awt.Color(255, 255, 255));
        rbdDecoys.setText("Append Decoys");
        rbdDecoys.setToolTipText("Include decoy sequences in the produced fasta file");

        jLabel2.setBackground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("What processing do you want for the created FASTA-file?");

        rbdCrap.setBackground(new java.awt.Color(255, 255, 255));
        rbdCrap.setText("Append abundant contaminants");
        rbdCrap.setToolTipText("Add FASTA entries from common and abundant contaminants. (ex Bovine Albumin)");

        rdbAppend.setBackground(new java.awt.Color(255, 255, 255));
        rdbAppend.setText("Append To Existing Fasta");
        rdbAppend.setToolTipText("Use this to avoid overridding the selected output FASTA-file");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rdbDuplicateAccessions)
                            .addComponent(rbdCrap)
                            .addComponent(rbdDecoys))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rdbAppend)
                            .addComponent(rdbDuplicateSequences))))
                .addContainerGap(42, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(rbdDecoys)
                        .addGap(18, 18, 18)
                        .addComponent(rbdCrap)
                        .addGap(18, 18, 18)
                        .addComponent(rdbDuplicateAccessions))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(rdbDuplicateSequences)
                        .addGap(18, 18, 18)
                        .addComponent(rdbAppend)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel2;
    private javax.swing.JRadioButton rbdCrap;
    private javax.swing.JRadioButton rbdDecoys;
    private javax.swing.JRadioButton rdbAppend;
    private javax.swing.JRadioButton rdbDuplicateAccessions;
    private javax.swing.JRadioButton rdbDuplicateSequences;
    // End of variables declaration//GEN-END:variables
}
